#include "IWDG.h"

void IWDG_Init(void)
{
    /* 
    计算方法：Tout_((4*2^prer)*rel)/40 ms
    */
    IWDG_WriteAccessCmd(IWDG_WriteAccess_Enable);
    IWDG_SetPrescaler(IWDG_Prescaler_8);
    IWDG_SetReload(99);
    IWDG_ReloadCounter();
    IWDG_Enable();
}

void IDWG_Feed(void)
{
    IWDG_ReloadCounter();
}


